package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BookingCommissionRulesMapper;
import com.ruoyi.system.domain.BookingCommissionRules;
import com.ruoyi.system.service.IBookingCommissionRulesService;

/**
 * 预订提成规则（含联系方式）Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-18
 */
@Service
public class BookingCommissionRulesServiceImpl implements IBookingCommissionRulesService
{
    @Autowired
    private BookingCommissionRulesMapper bookingCommissionRulesMapper;

    /**
     * 通过id查询预订提成规则
     *
     * @param id 预订提成规则（含联系方式）主键
     * @return 预订提成规则（含联系方式）
     */
    @Override
    public BookingCommissionRules selectBookingCommissionRulesById(Long id)
    {
        return bookingCommissionRulesMapper.selectBookingCommissionRulesById(id);
    }

    /**
     * 查询预订提成规则列表
     *
     * @param bookingCommissionRules 预订提成规则（含联系方式）
     * @return 预订提成规则（含联系方式）
     */
    @Override
    public List<BookingCommissionRules> selectBookingCommissionRulesList(BookingCommissionRules bookingCommissionRules)
    {
        return bookingCommissionRulesMapper.selectBookingCommissionRulesList(bookingCommissionRules);
    }

    /**
     * 新增预订提成规则
     *
     * @param bookingCommissionRules 预订提成规则（含联系方式）
     * @return 结果
     */
    @Override
    public int insertBookingCommissionRules(BookingCommissionRules bookingCommissionRules)
    {
        return bookingCommissionRulesMapper.insertBookingCommissionRules(bookingCommissionRules);
    }

    /**
     * 修改预订提成规则
     *
     * @param bookingCommissionRules 预订提成规则（含联系方式）
     * @return 结果
     */
    @Override
    public int updateBookingCommissionRules(BookingCommissionRules bookingCommissionRules)
    {
        return bookingCommissionRulesMapper.updateBookingCommissionRules(bookingCommissionRules);
    }

    /**
     * 通过id批量删除预订提成规则信息
     *
     * @param ids 需要删除的预订提成规则（含联系方式）主键
     * @return 结果
     */
    @Override
    public int deleteBookingCommissionRulesByIds(Long[] ids)
    {
        return bookingCommissionRulesMapper.deleteBookingCommissionRulesByIds(ids);
    }

    /**
     * 通过id删除预订提成规则信息
     *
     * @param id 预订提成规则（含联系方式）主键
     * @return 结果
     */
    @Override
    public int deleteBookingCommissionRulesById(Long id)
    {
        return bookingCommissionRulesMapper.deleteBookingCommissionRulesById(id);
    }
}
